<?php include_once("../../../common/common_setting_unit.php");         // 引入通用的设置文件 ?>
<?php include_once(ROOT_PATH_ . "/controller/common/module/head.php"); // 引入通用的头部 ?>
<?php include_once("../controller/data_edit.php");                     // 当前页面的控制器 ?>



<body>

<!--顶部栏-->
<div id="topbar"> <?php include ROOT_PATH_ . '/controller/common/module/topbar.php'; ?></div>

<!--容器-->
<div id="container" class="<? echo $now_extender ?>">

    <!--侧边栏-->
    <div id="sidebar"><?php include ROOT_PATH_ . '/controller/common/module/sidebar.php'; ?></div>





    <?
    //==============================================================================
    //这里开始才是平常开发需要注重的部分，其余的基本不用理会
    //==============================================================================
    ?>

    <div id="content" class="layui-form">




			<?php $page_title='品牌编辑';?>
<fieldset class="layui-elem-field layui-field-title">
                <legend> <?php echo $page_title;?> </legend>
            </fieldset>


            <div class="list-box">
     			<div class="box department-add-box detail-box">

       <form id="edit-department-form" method="post" action="detail-edit-function.php?nav-itemed=department" enctype="multipart/form-data" >



                        <div class="layui-form-item">
                            <label class="layui-form-label">品牌</label>
                            <div class="layui-input-block">
                                <input type="text" name="name" required  lay-verify="required" placeholder="请输入品牌名称" value="<?echo $detail['name']?>" autocomplete="off" class="layui-input">
                            </div>
                        </div>

           <!-- 图片上传 -->
           <? include("mod-images-upload.php");?>

                        <div class="layui-form-item">
                            <label class="layui-form-label">当前状态</label>
                            <div class="layui-input-block">
                                <input type="radio" name="status" value="启用" title="启用" <? if($detail['status']=="启用"){echo "checked";} ?>>
                                <input type="radio" name="status" value="关闭" title="关闭" <? if($detail['status']=="关闭"){echo "checked";} ?>>
                            </div>
                        </div>



                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">备注</label>
                            <div class="layui-input-block">
                                <textarea name="remark" placeholder="备注" class="layui-textarea"><?echo $detail['reamrk']?></textarea>
                            </div>
                        </div>



                            <input type="hidden" name="nid" value="<?echo $detail['nid']?>"  >






                        <div class="function">
                                <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            <a href="detail-list.php?now_extender=<? echo $_REQUEST['now_extender'] ?>" class="layui-btn layui-btn-primary">返回列表</a>

                        </div>
                        </div>
                    </form>

                    <script>
                        //Demo
                        //Demo
                        layui.use('form', function(){
                            var form = layui.form;



                            //监听提交
                            // form.on('submit(formMemberAdd)', function(data){
                            // layer.msg(JSON.stringify(data.field));
                            // layer.msg("这只是返回消息而已");
                            // return false;
                            // });




                        });
                    </script>



            </div>


        </div>
    		</div>

	</div>

</div>
<!--底部栏-->
<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>
</body>
</html>